//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Xml;

namespace CommunityServer.Components
{
	/// <summary>
	/// Summary description for CSSearch.
	/// </summary>
	public class CSSearch
	{
		private CSSearch()
		{

		}

        public static SearchResultSet Search(SearchQuery query)
        {
            CSEvents.PreSearch(query);
            SearchResultSet results = SearchProvider.Instance().Search(query);
            CSEvents.PostSearch(results);
            return results;
        }
	}

//    public class SearchModule : ICSModule
//    {
//        public void Init(CSApplication csa, XmlNode node)
//        {
//            csa.PreSearch +=new EventHandler(csa_PreSearch);
//        }
//
//        private void csa_PreSearch(object sender, EventArgs e)
//        {
//            SearchQuery query = sender as SearchQuery;
//            if(query != null)
//            {
//                EventLogs.Info(query.QueryText,"Search",20,CSContext.Current.SettingsID);
//            }
//        }
//    }
}
